#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int arr1[4];
	int arr2[4];
	int i = 0;
	int middle = 0;
	for (i = 0; i < 4; i++)
	{
		scanf("%d", &arr1[i]);
	}
	for (i = 0; i < 4; i++)
	{
		scanf("%d", &arr2[i]);
	}
	for (i = 0; i < 4; i++)
	{
		middle = arr1[i];
		arr1[i] = arr2[i];
		arr2[i] = middle;
	}
	printf("arr1[4]: ");
	for (i = 0; i < 4; i++)
	{
		printf("%d ", arr1[i]);
	}
	printf("\n");
	printf("arr2[4]: ");
	for (i = 0; i < 4; i++)
	{
		printf("%d ", arr2[i]);
	}
	return 0;
}